<!--# layout("/common/layout.html",{"jsBase":"/js/content/resCloudFile/"}){ -->

<form class="layui-form layui-form-pane" id="addForm"  lay-filter="editform">
    <input type="hidden" name="fileUrl" id="fileUrl">

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">文件路径</label>
				<div class="layui-input-inline">
                                    <span style="line-height:38px;margin-left:8px">
                                        ${resCloudFile.filePath}
                                    </span>
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">远程资源id</label>
				<div class="layui-input-inline">
                                    <span style="line-height:38px;margin-left:8px">
                                        ${resCloudFile.cloudId}
                                    </span>
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">资源类型 a、图片，b、音频，c、视频，d、短视频，e、文本文件，f、文件</label>
				<div class="layui-input-inline">
                                    <span style="line-height:38px;margin-left:8px">
                                        ${resCloudFile.mediaType}
                                    </span>
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">内容类型</label>
				<div class="layui-input-inline">
                                    <span style="line-height:38px;margin-left:8px">
                                        ${resCloudFile.resClass}
                                    </span>
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">云类型 ali、阿里云，tencent、腾讯云</label>
				<div class="layui-input-inline">
                                    <span style="line-height:38px;margin-left:8px">
                                        ${resCloudFile.cloudType}
                                    </span>
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">关联id</label>
				<div class="layui-input-inline">
                                    <span style="line-height:38px;margin-left:8px">
                                        ${resCloudFile.resId}
                                    </span>
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">更新时间</label>
				<div class="layui-input-inline">
                                    <span style="line-height:38px;margin-left:8px">
                                        ${resCloudFile.updateTime}
                                    </span>
				</div>
            </div>
        </div>
    </div>
    <layui:submitButtons id="addButton" />
</form>
<!--#} -->
<script>
layui.define([ 'form', 'laydate', 'table','resCloudFileApi'], function(exports) {
    var form = layui.form;
    var resCloudFileApi = layui.resCloudFileApi;
    var index = layui.index;
    var isNew = true;
    <!--# if(!(isEmpty(resCloudFileJson))){  -->
    isNew = false;
    <!--# } -->
    var view = {
        init:function(){
            Lib.initGenrealForm($("#addForm"),form);
            this.initSubmit();
        },
        initSubmit:function(){
            $("#addButton").click(function(){
                form.on('submit(form)', function(){
                    resCloudFileApi.saveForm(isNew,$('#addForm'),function(){
                        parent.window.dataReload();
                        Common.info("保存成功");
                        Lib.closeFrame();
                    });
                });
            });

            $("#addButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }

    }
    view.init();
    <!--# if(!(isEmpty(resCloudFileJson))){  -->
    var formJson = ${resCloudFileJson};
    form.val("editform",formJson);
    <!--# } -->
});
</script>
